package org.ifdb.persistency.entity;

import java.util.List;

import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.IdentityType;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;

@PersistenceCapable(identityType = IdentityType.APPLICATION)
public class Contact {
	@PrimaryKey
	@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
	private Long id;	

	@Persistent
	private String phone;

	@Persistent
	private String mail;

	@Persistent
	private String site;

	@Persistent
	private List<ContactNetwork> socialNetworks;

	public Long getId() {
		return id;
	}
	
	public String getPhone() {
		return phone;
	}

	public void setPhone(String phone) {
		this.phone = phone;
	}

	public String getMail() {
		return mail;
	}

	public void setMail(String mail) {
		this.mail = mail;
	}

	public String getSite() {
		return site;
	}

	public void setSite(String site) {
		this.site = site;
	}

	public List<ContactNetwork> getSocialNetworks() {
		return socialNetworks;
	}

	public void setSocialNetworks(List<ContactNetwork> socialNetworks) {
		this.socialNetworks = socialNetworks;
	}

	public void setSocialNetworks(ContactNetwork socialNetworks) {
		this.socialNetworks.add(socialNetworks);
	}
}
